#ifndef __LM_LISTVIEW_H__
#define __LM_LISTVIEW_H__

#include "lm_win.h"
#include "../common/lm_list.h"
#include "lm_color.h"


typedef struct lm_listview_node {
    lm_list_node_t link;
    char*    text;

}lm_listview_node_t;


typedef struct lm_listview {
    lm_title_win_t win;
    lm_list_node_t head;
    int            current;
    lm_color_t     color;

}lm_listview_t;


int lm_listview_add_item(lm_list_node_t* head, char* text);
char* lm_listview_create(int x, int y, int32_t width, int32_t height, const char* title, lm_list_node_t* head, lm_color_t color);


#ifdef __cplusplus
extern "C" {
#endif


#ifdef __cplusplus
} /*extern "C"*/
#endif


#endif //!__LM_LISTVIEW_H__
